home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / pctjag86.arc / ATBIOS.PAS < prev    next >
Pascal/Delphi Source File  |  1986-05-29  |  4KB  |  113 lines

  1. { ATBIOS -- PC Tech Journal AT BIOS Information Display Program  }
  2. {                                                                }
  3. { Version 1.00                                                   }
  4. { Last modified 05/23/86                                         }
  5. { Copyright (c) 1986, PC Tech Journal                            }
  6. { Program by: Paul Pierce, Ted Forgeron, Steven Armbrust         }
  7. {                                                                }
  8. { Displays pertinent information from the BIOS code and data     }
  9. { areas.                                                         }
  10. {                                                                }
  11. { This program is written in Turbo Pascal.  However, it can      }
  12. { be easily ported to any Pascal compiler that allows absolute   }
  13. { addressing.                                                    }
  14.  
  15. PROGRAM at_bios_info ;
  16.  
  17.   CONST
  18.     at_id = $fc ;
  19.     printer_mask = $c000 ;
  20.     game_mask = $1000 ;
  21.     serial_mask = $0e00 ;
  22.     dma_mask = $0100 ;
  23.     drive_num_mask = $00c0 ;
  24.     video_mask = $0030 ;
  25.     ndp_mask = $0002 ;
  26.     drive_mask = $0001 ;
  27.     co40 = $0010 ;
  28.     co80 = $0020 ;
  29.     mono = $0030 ;
  30.  
  31.   VAR
  32.     i : integer ;
  33.     romdate : ARRAY [1..9] OF char absolute $f000:$fff5 ;
  34.     machine_id : byte absolute $f000:$fffe ;
  35.     copyright : ARRAY [1..80] OF char absolute $f000:$e000 ;
  36.     equip_flag : integer absolute $40:$10 ;
  37.     mem_size : integer absolute $40:$13 ;
  38.     key_buf : ARRAY [1..32] OF char absolute $40:$1e ;
  39.     video_mode : byte absolute $40:$49 ;
  40.  
  41.   BEGIN
  42.     clrscr;
  43.     write('ATBIOS -- PC Tech Journal AT BIOS Information ') ;
  44.     writeln('Display');
  45.     writeln('Version 1.00, Copyright (c) 1986 PC Tech Journal') ;
  46.     writeln;
  47.     writeln('ROM BIOS date is                       ',romdate) ;
  48.     IF machine_id = at_id THEN
  49.       writeln('Machine ID is                          AT COMPATIBLE')
  50.     ELSE
  51.       writeln('Machine ID is                          NOT AT') ;
  52.     write('Copyright Statement is ') ;
  53.     window(40,6,80,7);
  54.     gotoxy(1,1);
  55.     write(copyright) ;
  56.     window(1,1,80,25) ;
  57.     gotoxy(1,8);
  58.     write('Diskette Drives Installed              ') ;
  59.     if (equip_flag and drive_mask) <> 0
  60.     then writeln(((drive_num_mask and equip_flag) div 64) + 1)
  61.     else writeln('0');
  62.     write('80287 Math Coprocessor                 ') ;
  63.     if (equip_flag and ndp_mask) <> 0
  64.     then writeln('YES')
  65.     else writeln('NO');
  66.     write('Initial Video Mode                     ') ;
  67.     case (equip_flag and video_mask) of
  68.       co40: writeln('CGA 40x25 B/W text');
  69.       co80: writeln('CGA 80x25 B/W text');
  70.       mono: writeln('Monochrome 80x25 text');
  71.     end;
  72.     write('Current Video Mode                     ') ;
  73.     case video_mode of
  74.       00: writeln('CGA 40x25 B/W text');
  75.       01: writeln('CGA 40x25 16-color text');
  76.       02: writeln('CGA 80x25 B/W text');
  77.       03: writeln('CGA 80x25 16-color text');
  78.       04: writeln('CGA 320x200 4-color graphics');
  79.       05: writeln('CGA 320x200 4-gray graphics');
  80.       06: writeln('CGA 640x200 B/W graphics');
  81.       07: writeln('Monochrome 80x25 text');
  82.       08: writeln('JR 160x200 16-color graphics');
  83.       09: writeln('JR 320x200 16-color graphics');
  84.       10: writeln('EGA 640x200 4/64-color graphics');
  85.       13: writeln('EGA 320x200 16-color graphics');
  86.       14: writeln('EGA 640x200 16-color graphics');
  87.       15: writeln('EGA 640x350 4-color graphics');
  88.     end;
  89.     write('DMA Present                            ');
  90.     if (equip_flag and dma_mask) <> 0
  91.     then writeln('NO')
  92.     else writeln('YES');
  93.     writeln('RS-232 Serial Ports                    ',
  94.              (equip_flag and serial_mask) div 512);
  95.     write('Game Adapter Present                   ');
  96.     if (equip_flag and game_mask) <> 0
  97.     then writeln('YES')
  98.     else writeln('NO');
  99.     writeln('Parallel Printer Ports                 ',
  100.              abs((equip_flag and printer_mask) div 16384));
  101.     writeln('Memory Size in K Bytes                 ',mem_size);
  102.     write('Keyboard Buffer Contents               ');
  103.     i := 1;
  104.     while i <= 32 do
  105.     begin
  106.       if (key_buf[i] < '!') or (key_buf > '}') then
  107.         write('.')
  108.       else write(key_buf[i]);
  109.       i := i + 2 ;
  110.     end;
  111.     writeln;
  112.   END.
  113.